package cn.lls;

import cn.lls.base.common.LlsConstant;
import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@ComponentScan(basePackages = {"cn.lls.base", "cn.lls", "cn.lls.service"})
@EnableAsync
public class LlsServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(LlsServiceApplication.class, args);
    }

    @Bean
    public OSS ossClient() {
        return new OSSClientBuilder().build(LlsConstant.ENDPOINT, LlsConstant.ACCESSKEYID, LlsConstant.ACCESSKEYSECRET);
    }
}